import math


def triangle_type_and_area(a, b, c):
    sides = sorted([a, b, c])
    a, b, c = sides
    if a + b <= c:
        return "不构成三角形"

    # 判断类型
    type_str = ""
    if a == b == c:
        type_str += "等边"
    elif a == b or b == c or a == c:
        type_str += "等腰"
    if math.isclose(a**2 + b**2, c**2):
        type_str += "直角"
    if not type_str:
        type_str = "普通"

    # 海伦公式计算面积
    s = (a + b + c) / 2
    area = math.sqrt(s * (s - a) * (s - b) * (s - c))
    return f"{type_str}三角形，面积为{area:.2f}"


# 主程序
try:
    a = float(input("请输入边A: "))
    b = float(input("请输入边B: "))
    c = float(input("请输入边C: "))
    result = triangle_type_and_area(a, b, c)
    print(result)
except ValueError:
    print("请输入有效的数字")
